
<template>
  <div class="top-part">
    <div class="background-img-wrap">
      <img class="background-img" :src="bgImage" />
    </div>
    <div class="main">
      <img class="logo" :src="logoImage" />
      <div class="slogan">
        <h3>创作你的创作</h3>
        <h6>一个优质创作社区</h6>
      </div>
      <div class="link-group">
        <div class="download">
          <button class="ios-link">
            <span class="iconfont ic-ios">&#xe676;</span>
            <span>iOS 下载</span>
          </button>
        </div>
      </div>
    </div>
    <div class="phone-img-wrap">
      <img class="phone-img" :src="phoneImage" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'DownloadHeader',
  data () {
    return {
      bgImage: require('images/misc-background.png'),
      logoImage: require('images/misc-logo.png'),
      phoneImage: require('images/misc-phone.png')
    }
  }
}
</script>

<style scoped>
  .top-part {
    position: relative;
    height: 100vh;
    margin-bottom: .4rem;
  }
  /* 增加一个渐变色效果 */
  .top-part:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: .4rem;
    background: linear-gradient(to top, rgba(66, 66, 66, .08), rgba(66, 66, 66, 0))
  }
  .background-img-wrap {
    overflow: hidden;
    height: 0px;
    padding-bottom: 22.5%;
  }
  .background-img {
    width: 100%;
  }
  .main {
    position: absolute;
    width: 4.8rem;
    height: 5.14rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -260px);
    text-align: center;
  }
  .logo {
    width: 2rem;
    height: 2rem;
    margin-top: .4rem;
  }
  .slogan {
    margin-top: .1rem;
    line-height: 1.6;
  }
  .slogan>h3 {
    font-size: .48rem;
  }
  .slogan>h6 {
    font-size: .3rem;
    font-weight: 300;
  }
  .link-group {
    margin-top: .42rem;
    height: .98rem;
  }
  .download {
    height: 100%;
  }
  .ios-link {
    background: #6dacf4;
    width: 100%;
    line-height: 1;
    padding: .26rem 0;
    border-radius: .08rem;
  }
  .ios-link>span {
    font-family: sans-serif;
    font-size: 18px;
    color: #fff;
    vertical-align: middle;
    line-height: 23px;
  }
  .ic-ios {
    font-size: 20px !important;
    margin-right: .08rem;
  }
  .phone-img-wrap {
    width: 80%;
    height: 0;
    padding-bottom: 61.3%;
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%);
  }
  .phone-img {
    width: 100%;
  }
</style>
